package com.isprint.jslx.lcc.global.interceptor;

import com.isprint.jslx.base.inteceptor.InterceptorBase;
import com.isprint.jslx.common.CommonProperties;
import com.isprint.jslx.lcc.Jfinal.LccJfinalConfig;
import com.jfinal.core.Controller;

/**
 * Created by ydw on 2017/7/14.
 */
public class GlobalInitInterceptor extends InterceptorBase {

        @Override
        public void init() {
            this.setATTRIBUTENAME(LccJfinalConfig.GLOBALUSERUUID);
            this.setCOOKIEEXPIRETIME(CommonProperties.USERCOOKIEEXPIRETIME);
            this.setDOMAIN(CommonProperties.USERDOMAIN);
            this.setUUIDNAME(CommonProperties.getUSERUUIDNAME());
        }

	    public GlobalInitInterceptor(){
            super();
        }

        @Override
        public void errorRenderWrapper(Controller controller) {
            controller.renderJson();
        }
}
